/*
 * Created on 28/02/2004
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package org.potiorb.demo.server;


import java.io.*;

import org.potiorb.orb.ORB;
import org.potiorb.orb.Object;
import org.potiorb.orb.poa.POA;
import org.potiorb.orb.poa.POAHelper;
import org.potiorb.orb.portable.ObjectId;


public class Server {

		public static void main(String[] args)
		{
			try
			{

                           ORB orb = ORB.init( args, null );

				//init POA
                           POA poa = POAHelper.narrow( orb.resolve_initial_references( "RootPOA" ));
			    TesteImpl teste = new TesteImpl();

			    ObjectId oid = poa.activate_object(teste);
			    poa.the_POAManager().activate();

			    Object obj = poa.id_to_reference (oid);

  			    orb.run();
			}
			catch( Exception e )
			{
				System.out.println( e );
			}
		}
	}
